package com.daka.vo.response;

import com.daka.entity.BaseAddress;
import com.daka.entity.Group;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * Created by yangx
 * CreateTime: 2016/10/24 19:07
 */

@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class BassAddressResponseSimpl {

    private Long id;
    private String name;
    private Long groupId;


    public static BassAddressResponseSimpl buildVO(BaseAddress baseAddress) {
        BassAddressResponseSimpl bassAddressResponseSimpl =  new BassAddressResponseSimpl();

        bassAddressResponseSimpl.setId(baseAddress.getId());
        bassAddressResponseSimpl.setName(baseAddress.getName());
        bassAddressResponseSimpl.setGroupId(baseAddress.getGroupId());

        return bassAddressResponseSimpl;
    }
}
